package it.polimi.traveldream.ejb.entities;

import it.polimi.traveldream.ejb.dto.ProviderDTO;

import java.io.Serializable;
import java.lang.String;

import javax.persistence.*;

/**
 * Author: Samuele Tosatto
 * Description:
 * 
 * This Entity represents a Provider (who's sell to TravelDream their BasicProducts).
 *
 */
@Entity

public class Provider implements Serializable {

	   
	@Id
	private String Name;
	private String Email;
	private String Address;
	private String Telephone;
	private static final long serialVersionUID = 1L;

	public Provider() {
		super();
	}   
	
	public Provider(ProviderDTO provider){
		super();
		this.Name=provider.getName();
		this.Email=provider.getEmail();
		this.Address=provider.getAddress();
		this.Telephone=provider.getTelephone();
	}
	
	public String getName() {
		return this.Name;
	}

	public void setName(String Name) {
		this.Name = Name;
	}   
	public String getEmail() {
		return this.Email;
	}

	public void setEmail(String Email) {
		this.Email = Email;
	}   
	public String getAddress() {
		return this.Address;
	}

	public void setAddress(String Address) {
		this.Address = Address;
	}   
	public String getTelephone() {
		return this.Telephone;
	}

	public void setTelephone(String Telephone) {
		this.Telephone = Telephone;
	}
	public ProviderDTO getDTO(){
		ProviderDTO ret = new ProviderDTO();
		ret.setName(Name);
		ret.setAddress(Address);
		ret.setTelephone(Telephone);
		ret.setEmail(Email);
		return ret;
	}
}
